home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Archives
/
ForCLI
/
AntiBorder.lha
/
AntiBorder
/
ab.s
< prev
next >
Wrap
Text File
|
1991-08-26
|
4KB
|
200 lines
* ANTIBORDER V1.0 RECONSTRUCTION (I LOST THE SOURCE)
* (C) 1990,91 Paul Hayter
* LATE JUNE 91
INCLUDE "PHAD:DEFS/INTUITION.DEFS"
INCLUDE "PHAD:DEFS/GRAPHICS.DEFS"
INCLUDE "PHAD:DEFS/LIBRARIES.DEFS"
INCLUDE "PHAD:OFFS/DOS.I"
INCLUDE "PHAD:OFFS/EXEC.I"
INCLUDE "PHAD:OFFS/INTUITION.I"
BEGIN
move.l (4).w,a6
move.l a0,a5
cmp.b #10,(a0)
bne.s gotoit
rts
gotoit
moveq #0,d0
lea dosname(pc),a1
jsr _LVOOpenLibrary(a6)
move.l d0,dosbase
cmpi.b #'?',(a5)
beq query
move.b (a5),yesorno
cmpi.b #$0A,$01(a5)
beq.s noram
cmpi.b #'r',$02(a5)
bne.s noram
move.l dosbase(pc),a4 IF r OPTION SPECIFIED
lea ramname(pc),a0 THEN LOCK RAM:
move.l a0,d1
moveq #ACCESS_READ,d2 WHICH MAKES SURE RAM-HANDLER IS LOADED
jsr _LVOLock(a4)
tst.l d0
beq.s noram
move.l d0,d1
jsr _LVOUnLock(a4)
noram
moveq #$00,d0
lea intname(pc),a1
jsr _LVOOpenLibrary(a6)
move.l d0,intbase
move.l d0,a6
move.l ib_ActiveWindow(a6),a4
bsr.s move_and_resize
move.b yesorno(pc),d0
cmp.b #'y',d0
beq.s noframe
RESTORE_OLD_STATE
bsr clear_screen
bsr restore_borders
1$
bsr null_resize
bsr home_cursor
moveq #$00,d1
bsr.s read_screen
cmp.l #$FFFFFFFF,d0 Check if top line has menu bar still there
bne.s 1$
bsr clear_screen
bra.s finish_up
noframe bsr kill_borders
1$ bsr clear_screen
moveq #$08,d1
bsr.s read_screen
tst.b d0
bne.s 1$
finish_up move.l intbase(pc),a1
move.l (4).w,a6
jsr _LVOCloseLibrary(a6)
closedos move.l dosbase(pc),a1
jsr _LVOCloseLibrary(a6)
moveq #0,d0
rts
query move.l d0,a5
lea query_text(pc),a0
move.l a0,d2
move.l #query_text_end-query_text,d3
bsr.s clr2
bra.s closedos
read_screen
move.l wd_RPort(a4),a1
move.l rp_BitMap(a1),a0
move.l bm_Planes(a0),a1
move.l 0(a1,d1.l),d0 Read 32 pixels
rts
move_and_resize
moveq #0,d1 A4=WINDOW
move.w wd_LeftEdge(a4),d1
moveq #0,d0
sub.l d1,d0
moveq #0,d2
move.w wd_TopEdge(a4),d2
moveq #0,d1
sub.l d2,d1
move.l a4,a0
jsr _LVOMoveWindow(a6)
move.l ib_ActiveScreen(a6),a5 A5=SCREEN
move.w wd_Height(a4),d2
move.w sc_Height(a5),d1
sub.w d2,d1
ext.l d1
move.w wd_Width(a4),d2
move.w sc_Width(a5),d0
sub.w d2,d0
ext.l d0
move.l a4,a0
jsr _LVOSizeWindow(a6) KEEP SIZING WINDOW UNTIL THE SIZE
1$ move.w sc_Height(a5),d0 READS BACK OK
cmp.w wd_Height(a4),d0
bne.s 1$
move.w sc_Width(a5),d0
cmp.w wd_Width(a4),d0
bne.s 1$
rts
home_cursor
lea home(pc),a0
move.l a0,d2
moveq #3,d3
bra.s clr2
clear_screen
lea cls(pc),a0
move.l a0,d2
moveq #1,d3
clr2 move.l dosbase(pc),a5
jsr _LVOOutput(a5)
move.l d0,d1
jsr _LVOWrite(a5)
rts
kill_borders
moveq #0,d0
jsr _LVOLockIBase(a6)
move.l d0,-(sp)
bset.b #3,wd_Flags+2(a4)
clr.b wd_BorderTop(a4)
clr.b wd_BorderBottom(a4)
clr.b wd_BorderRight(a4)
clr.b wd_BorderLeft(a4)
move.l a4,a0
jsr _LVORefreshWindowFrame(a6)
move.l (sp)+,a0
jsr _LVOUnlockIBase(a6)
jsr _LVORemakeDisplay(a6)
rts
null_resize
moveq #$00,d0
moveq #$00,d1
move.l a4,a0
jsr _LVOSizeWindow(a6)
move.l a4,a0
jsr _LVORefreshWindowFrame(a6)
rts
restore_borders
moveq #0,d0
jsr _LVOLockIBase(a6)
move.l d0,-(sp)
bclr.b #3,wd_Flags+2(a4)
move.b #11,wd_BorderTop(a4)
move.b #2,wd_BorderBottom(a4)
move.b #18,wd_BorderRight(a4)
move.b #4,wd_BorderLeft(a4)
move.l a4,a0
jsr _LVORefreshWindowFrame(a6)
move.l (sp)+,a0
jsr _LVOUnlockIBase(a6)
jsr _LVORemakeDisplay(a6)
rts
dosbase dc.l 0
intbase dc.l 0
yesorno dc.b 0
intname dc.b 'intuition.library',0
dosname dc.b 'dos.library',0
ramname dc.b 'ram:',0
query_text
dc.b $1b,'[33mAntiBorderV1.0 (C)1990 Paul Hayter',$1b,'[31m',10
dc.b 'Usage: AntiBorder y -Big Window, No Border.',10
dc.b ' AntiBorder n -Big Window with Border.',10
dc.b ' AntiBorder y r -Big Window, No Border, Lock RAM:',10
dc.b ' AntiBorder n r -Big Window with Border, Lock RAM:',10
query_text_end
cls dc.b $0C
home dc.b $9b,'H '